package niuke;

import org.junit.Test;

import java.util.*;
import java.util.stream.Collectors;

/**
 * 1.
 *
 * @author yangxiaogen
 * @date 2023/3/7 20:10
 */
public class HJ03 {
    @Test
    public void test03() {
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        List<Integer> integerList = new ArrayList<>(num);
        for (int i = 0; i < num; i++) {
            int inputInteger = in.nextInt();
            integerList.add(inputInteger);
        }
        List<Integer> sortNums = getSortNums(integerList);
        sortNums.forEach(System.out::println);
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        List<Integer> integerList = new ArrayList<>(num);
        for (int i = 0; i < num; i++) {
            integerList.add(in.nextInt());
        }
        List<Integer> sortNums = getSortNums(integerList);
        sortNums.forEach(System.out::println);
    }

    private static List<Integer> getSortNums(List<Integer> original){
        return original.stream().distinct().sorted(Comparator.naturalOrder()).collect(Collectors.toCollection(LinkedList::new));
    }


}
